<?php 
	include ("../../config/koneksi.php");
	$id = $_GET['id'];
	$q = "select * from master_inacbg m inner join jenis_inacbg j on m.id_jenis_inacbg = j.id_jenis_inacbg";
	$r = mysql_query($q);
	
	$content = "NO;KODE;DESKRIPSI;ALOS;KODE JENIS;JENIS INACBG;NOT KLAIM\n";
	while ($data = mysql_fetch_array($r)) {
		$no++;
		$content .= "$no;$data[kode_inacbg];$data[deskripsi];$data[alos];$data[id_jenis_inacbg];$data[jenis_inacbg];$data[not_klaim]\n";
	};

	header("Content-type: text/csv");
	header("Content-Disposition: attachment; filename=master_inacbg.csv");
	header("Pragma: no-cache");
	header("Expires: 0");
	echo $content;
?>